Data Source Wizard Screen 1

On the first screen of the wizard, you can specify the name and description of the data source, and the name of the SQL Server the data source will connect to.

Name box

The data source name used by an ODBC application when it requests a connection to the data source. For example, “Personnel.” The data source name is displayed in the ODBC Data Source Administrator dialog box.

Description box

An optional, description of the data source. For example, “Hire date, salary history, and current review of all employees.”

Server box

The name of a SQL Server on your network. If you select a server name from the list, no further configuration is needed. If you enter the name of a server that does not exist as an entry in the SQL Client Configuration Utility, you can create a SQL Client Configuration entry for the new name on the next screen of the wizard.

You can enter "(local)" as the server on a Microsoft Windows NT computer. The user can then use a local copy of SQL Server (that listens on named pipes), even when running a nonnetworked version of SQL Server. Note that when the 16-bit SQL Server driver is using "(local)" without a network, the Microsoft Loopback Adapter must be installed.

For more information about server names for different types of networks, see Installing SQL Server in SQL Server Books Online.


Data Source Wizard Screen 2

On the second screen of the wizard, you can specify the method of authentication and set up SQL Server advanced-client entries and the login and password the SQL Server ODBC driver will use to connect to SQL Server while configuring the data source.

With Windows NT authentication using the network login ID

Specifies that the SQL Server ODBC driver request a secure (or trusted) connection to SQL Server. When selected, SQL Server uses integrated login security to establish connections using this data source, regardless of the current login security mode at the server. Any login ID or password supplied is ignored. The SQL Server system administrator must have associated your Windows NT user account with a SQL Server login account.

With SQL Server authentication using a login ID and password entered by the user

Specifies that the SQL Server ODBC driver not request a secure (or trusted) connection to SQL Server. When selected, SQL Server uses standard login security to establish connections using this data source. You must specify a SQL Server login ID and password for all connection requests.

Client Configuration button

Launches the SQL Client Configuration utility.

If you specified a new name in the Server box on the first screen of the wizard, you may need to create an Advanced entry in the SQL Client Configuration utility. In the SQL Client Configuration utility, click the Advanced tab to create an advanced entry. The name specified for the advanced entry must match the name specified in the Server box on the first screen of the wizard.

Click Client Configuration if you want the connection to use a network library other than the client’s default network library. To determine the client’s default network library, click Client Configuration, and then click the Net Library tab in the SQL Client Configuration utility. Also click Client Configuration if the actual network address of the server must be specified for a successful connection. For example, when using the TCP/IP Net-Library you may need to specify the port and socket address of the server, or, if a SQL Server is listening on an alternate named pipe, you need to specify the pipe name in the advanced entry.

For more information about configuring clients, refer to SQL Server Books Online.

Connect to SQL Server to obtain default settings for the additional configuration options check box

When selected, the SQL Server driver obtains initial settings from the SQL Server for the options on the following screens of the wizard. The SQL Server driver connects to the SQL Server named in the Server box on the first screen.

When clear, the driver uses standard defaults as the initial settings for the options on the following screens in the wizard.

Login ID box

Specifies the login ID the SQL Server driver uses when connecting to SQL Server if With SQL Server authentication using a login ID and password entered by the user is selected. This only applies to the connection made to determine the server default settings; it does not apply to subsequent connections made using the data source after it has been created.

Password box

Specifies the password the SQL Server uses when connecting to SQL Server if With SQL Server authentication using a login ID and password entered by the user is selected. This only applies to the connection made to determine the server default settings; it does not apply to subsequent connections made using the new data source.

Both the Login ID and Password boxes are unavailable if With Windows NT authentication using the network login ID is selected.


Data Source Wizard Screen 3

On the third screen of the wizard, you can specify the default database, how the driver should use stored procedures to support SQLPrepare, various ANSI options to be used by the driver, and whether to use a failover server.

Change the default database to box

Specifies the default database for any connection made using the data source. When clear, connections use the default database defined for the login ID on the server. When selected, the database named in the box overrides the default database defined for the login ID. Using the default database for the login ID is more efficient than specifying a default database in the ODBC data source.

Create temporary stored procedures for prepared SQL statements and drop the stored procedures check box

When clear, the SQL Server driver does not create stored procedures to support the SQLPrepare ODBC function. When selected, the SQL Server driver creates temporary stored procedures to support the SQLPrepare ODBC function.

Only when you disconnect

Specifies that temporary stored procedures created for SQLPrepare are dropped when the SQLDisconnect ODBC function is called. This allows the driver to reuse stored procedures if the same SQL statement is prepared multiple times and reduces the overhead associated with dropping the stored procedures while the application is running. Selecting this option for an application that runs for a long time without disconnecting, or for an application that issues a lot of SQLPrepare calls, can lead to a build up of temporary stored procedures.

When you disconnect and as appropriate while you are connected

Specifies that temporary stored procedures created for SQLPrepare are dropped when SQLDisconnect is called, when SQLFreeHandle is called for the statement handle, or when SQLPrepare is called to prepare a new SQL statement on the same statement handle. Some overhead is generated because the temporary stored procedures are dropped while the application is running, but this prevents a build up of temporary stored procedures for long-running applications.

Use ANSI quoted identifiers check box

Specifies that QUOTED_IDENTIFIERS be set on when the SQL Server ODBC driver connects. When selected, SQL Server enforces ANSI rules regarding quote marks. Double quotes can only be used for identifiers, such as column and table names. Character strings must be enclosed in single quotes:

SELECT “au_id”

FROM “authors”

WHERE “au_lname” = ‘O’‘Brien’

When clear, applications that use quoted identifiers, such as the Microsoft Query utility that comes with Microsoft Excel, encounter errors when they generate SQL statements with quoted identifiers.

Use ANSI nulls, paddings, and warnings check box

Specifies that the ANSI_NULLS, ANSI_WARNINGS, and ANSI_PADDINGS options be set on when the SQL Server driver connects.

With ANSI_NULLS set on, the server enforces ANSI rules regarding comparing columns for NULL. The ANSI syntax “IS NULL” or “IS NOT NULL” must be used for all NULL comparisons. The Transact-SQL syntax “= NULL” is not supported.

With ANSI_WARNINGS set on, SQL Server issues warning messages for conditions that violate ANSI rules but do not violate the rules of Transact-SQL. Examples of such errors are data truncation on execution of an INSERT or UPDATE statement, or encountering a null value during an aggregate function.

With ANSI_PADDING set on, trailing blanks on varchar values and trailing zeroes on varbinary values are not automatically trimmed.

Use the failover SQL Server if the primary SQL Server is not available check box

Specifies that when a failover server is defined for the SQL Server specified in the data source, the SQL Server driver collects connection information for the failover server when it connects to the specified primary server. If the application loses its connection to the primary SQL Server, it cleans up its current transaction and attempts to reconnect to the primary SQL Server. If the driver detects that the primary server is not available, it automatically connects to the failover server.


Data Source Wizard Screen 4

On the fourth screen of the wizard, you can specify the language to be used for SQL Server messages, character set translation, and whether the SQL Server driver should use regional settings.

Change the language of SQL Server system messages to box

Each SQL Server can have multiple sets of system messages, with each set in a different language (English, Spanish, French, and so on). If a data source is defined against a server that has multiple sets of system messages, you can specify which language you want to use for system messages. In the list, click the language. This option is unavailable if only one language is installed on the SQL Server.

Use the following options to specify whether the driver automatically configures translations or whether other translation settings are used.

Let SQL Server ODBC driver choose the translation method

Specifies that the driver automatically configure itself for any needed character-set translations when a connection is made. There is no requirement that the client computer OEM code page be the same as the SQL Server code page.

Do not perform character set translation

Specifies that no character-set translation be performed. For example, if SQL Server and the client are using the same code page, no translation is needed.

Perform ANSI to OEM translation

Specifies that extended characters stored in the database be converted to ANSI (for use by Windows-based applications). Select this option for ODBC applications if SQL Server is using a non-ANSI character set. When selected, the client computer OEM code page must be the same as the SQL Server code page. With this option, the SQL Server ODBC driver performs translations through Windows API calls that use the client computer OEM code page. If the client computer is using a different OEM code page than the SQL Server code page, select Let SQL Server ODBC driver choose the translation method instead.

Use the ODBC translator

Select this to use an ODBC translator. To specify the ODBC translator page, click the Configure Translator button.

Use regional settings when outputting currency, numbers, dates, and times check box

Specifies that the driver use the regional settings of the client computer for formatting currency, numbers, dates, and times in character output strings. The driver uses the default regional setting for the Windows 95 or Windows NT login account of the user connecting through the data source. Select this option for applications that only display data, not for applications that process data.


Data Source Wizard Screen 5

On the fifth screen of the wizard, you can control the logging of long-running queries and driver statistics settings.

Save long running queries to the log file box

Specifies that the driver log any query that takes longer than the Long query time value. Long-running queries are logged to the specified file. To specify a log file, either type the full path and file name in the box or click Browse to select a log file by navigating through existing file directories.

Long query time (milliseconds) box

Specifies a threshold value, in milliseconds, for long-running query logging. Any query that takes longer than this number of milliseconds to run is logged.

Log ODBC driver statistics to the log file box

Specifies that statistics be logged. Statistics are logged to the specified file. To specify a log file, either type the full path and file name in the box or click Browse to select a log file by navigating through existing file directories.

The statistics log is a tab-delimited file that can be analyzed in Microsoft Excel or any other spreadsheet that supports tab-delimited files.


SQL Server Login Dialog Box

The SQL Server ODBC driver displays the SQL Server Login dialog box when you call an ODBC connection without specifying enough information for the driver to connect to a SQL Server.

When the SQL Server Login dialog box is first displayed, it contains only the:

Server box.

Login ID box.

Password box.

Use Trusted Connections check box.

OK, Cancel, and Options buttons.

If you click the Options button, the dialog box expands to also contain the Options group:

Database box

Language box

Application Name box

Workstation ID box

Server box

The name of a SQL Server on your network. If you select a server name from the list, no further configuration is needed. If you enter a server name that does not exist as an entry in the SQL Client Configuration utility, you can create a SQL Client Configuration entry for the new name on the next screen of the wizard.

You can enter "(local)" as the server on a Microsoft Windows NT computer. The user can then use a local copy of SQL Server (that listens on named pipes), even when running a nonnetworked version of SQL Server. Note that when the 16-bit SQL Server driver is using "(local)" without a network, the Microsoft Loopback Adapter must be installed.

For more information about server names for different types of networks, see Installing SQL Server in SQL Server Books Online.

Use Trusted Connection check box

Specifies that the SQL Server ODBC driver request a secure (or trusted) connection to SQL Server. When selected, SQL Server uses integrated login security to establish connections using this data source, regardless of the current login security mode at the server. Any login ID or password supplied is ignored. The SQL Server system administrator must have associated your Windows NT user account with a SQL Server login.

When clear, SQL Server uses standard login security to establish connections using this data source. You must specify a login ID and password for all connection requests.

Login ID box

Specifies the SQL Server login ID to use for the connection if Use Trusted Connection is not selected. A login is not needed if Use Trusted Connection is selected.

Password box

Specifies the password for the SQL Server login ID used for the connection if Use Trusted Connection is not selected. A password is not needed if Use Trusted Connection is selected.

Database box

Specifies the default database to use on the connection. This overrides the default database specified for the login on the server. If no database is specified, the connection uses the default database specified for the login on the server.

Language box

Specifies the national language to use for SQL Server system messages. The SQL Server must have the language installed. This overrides the default language specified for the login on the server. If no language is specified, the connection uses the default database specified for the login on the server.

Application Name box

Optionally specifies the application name to be stored in the program_name column in the row for this connection in master.dbo.sysprocesses.

Workstation ID box

Optionally specifies the workstation ID to be stored in the hostname column in the row for this connection in master.dbo.sysprocesses.